package com.minimalist.common.entity.lindi.vo.enterpriseregistration;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.minimalist.common.utils.Add;
import com.minimalist.common.utils.Update;
import com.mybatisflex.annotation.Column;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;

/**
 * @author 11987
 */

@Schema(name = "林地指标平台_企业注册信息实体")
public class LindiEnterpriseRegistrationVO implements Serializable{
    @Serial
    private static final long serialVersionUID = 1L;

    @NotNull(message = "企业注册ID不能为空", groups = {Update.class})
    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "enterpriseRegistrationId", description = "企业注册ID"
            , type = "string")
    private Long enterpriseRegistrationId;

    @NotBlank(message = "企业名称不能为空", groups = {Add.class, Update.class})
    @Schema(name = "enterpriseName", description = "企业名称", type = "string")
    private String enterpriseName;

    @NotBlank(message = "企业联系人不能为空", groups = {Add.class, Update.class})
    @Schema(name = "enterprisePerson", description = "企业联系人", type = "string")
    private String enterprisePerson;

    @NotBlank(message = "企业联系方式不能为空", groups = {Add.class, Update.class})
    @Schema(name = "enterpriseMobile", description = "企业联系方式", type = "string")
    private String enterpriseMobile;

    @Schema(name = "enterpriseBusinessLicense", description = "营业执照文件ID"
            , type = "Long")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long enterpriseBusinessLicense;
    @Schema(name = "enterpriseBusinessLicenseUrl", description = "营业执照文件URL"
            , type = "string")
    private String enterpriseBusinessLicenseUrl;

    @Schema(name = "enterpriseTax", description = "税务登记证文件ID"
            , type = "Long")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long enterpriseTax;
    @Schema(name = "enterpriseTaxUrl", description = "税务登记证文件URL"
            , type = "String")
    private String enterpriseTaxUrl;

    @Schema(name = "enterpriseCode", description = "企业组织机构代码文件ID"
            , type = "Long")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long enterpriseCode;
    @Schema(name = "enterpriseCodeUrl", description = "企业组织机构代码文件URL"
            , type = "String")
    private String enterpriseCodeUrl;

    @Schema(name = "enterpriseIdcard1", description = "企业法人身份证正面文件ID"
            , type = "Long")
    @JsonSerialize(using = ToStringSerializer.class)
    @Column("ENTERPRISE_IDCARD_1")
    private Long enterpriseIdcard1;
    @Schema(name = "enterpriseIdcard1Url", description = "企业法人身份证正面文件URL"
            , type = "String")
    private String enterpriseIdcard1Url;

    @Schema(name = "enterpriseIdcard2", description = "企业法人身份证反面文件ID"
            , type = "Long")
    @JsonSerialize(using = ToStringSerializer.class)
    @Column("ENTERPRISE_IDCARD_2")
    private Long enterpriseIdcard2;
    @Schema(name = "enterpriseIdcard2Url", description = "企业法人身份证反面文件URL"
            , type = "String")
    private String enterpriseIdcard2Url;

    @Schema(name = "enterpriseAttorney", description = "授权委托书文件ID"
            , type = "Long")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long enterpriseAttorney;
    @Schema(name = "enterpriseAttorneyUrl", description = "授权委托书文件URL"
            , type = "String")
    private String enterpriseAttorneyUrl;

    /**
     * 状态 0审核中 1审核通过 2审核未通过
     */
    @Schema(name = "status", description = "企业申请审核状态", type = "integer")
    private Integer status;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "createId", description = "创建人ID", type = "string")
    private Long createId;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "createId", description = "更新人ID", type = "string")
    private Long updateId;

    @Schema(name = "createTime", description = "创建时间", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime createTime;

    @Schema(name = "updateTime", description = "更新时间", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime updateTime;

    public LindiEnterpriseRegistrationVO(){
    }

    public Long getEnterpriseRegistrationId(){
        return enterpriseRegistrationId;
    }

    public void setEnterpriseRegistrationId(Long enterpriseRegistrationId){
        this.enterpriseRegistrationId = enterpriseRegistrationId;
    }

    public String getEnterpriseName(){
        return enterpriseName;
    }

    public void setEnterpriseName(String enterpriseName){
        this.enterpriseName = enterpriseName;
    }

    public String getEnterprisePerson(){
        return enterprisePerson;
    }

    public void setEnterprisePerson(String enterprisePerson){
        this.enterprisePerson = enterprisePerson;
    }

    public String getEnterpriseMobile(){
        return enterpriseMobile;
    }

    public void setEnterpriseMobile(String enterpriseMobile){
        this.enterpriseMobile = enterpriseMobile;
    }

    public Long getEnterpriseBusinessLicense(){
        return enterpriseBusinessLicense;
    }

    public void setEnterpriseBusinessLicense(Long enterpriseBusinessLicense){
        this.enterpriseBusinessLicense = enterpriseBusinessLicense;
    }

    public String getEnterpriseBusinessLicenseUrl(){
        return enterpriseBusinessLicenseUrl;
    }

    public void setEnterpriseBusinessLicenseUrl(String enterpriseBusinessLicenseUrl){
        this.enterpriseBusinessLicenseUrl = enterpriseBusinessLicenseUrl;
    }

    public Long getEnterpriseTax(){
        return enterpriseTax;
    }

    public void setEnterpriseTax(Long enterpriseTax){
        this.enterpriseTax = enterpriseTax;
    }

    public String getEnterpriseTaxUrl(){
        return enterpriseTaxUrl;
    }

    public void setEnterpriseTaxUrl(String enterpriseTaxUrl){
        this.enterpriseTaxUrl = enterpriseTaxUrl;
    }

    public Long getEnterpriseCode(){
        return enterpriseCode;
    }

    public void setEnterpriseCode(Long enterpriseCode){
        this.enterpriseCode = enterpriseCode;
    }

    public String getEnterpriseCodeUrl(){
        return enterpriseCodeUrl;
    }

    public void setEnterpriseCodeUrl(String enterpriseCodeUrl){
        this.enterpriseCodeUrl = enterpriseCodeUrl;
    }

    public Long getEnterpriseIdcard1(){
        return enterpriseIdcard1;
    }

    public void setEnterpriseIdcard1(Long enterpriseIdcard1){
        this.enterpriseIdcard1 = enterpriseIdcard1;
    }

    public String getEnterpriseIdcard1Url(){
        return enterpriseIdcard1Url;
    }

    public void setEnterpriseIdcard1Url(String enterpriseIdcard1Url){
        this.enterpriseIdcard1Url = enterpriseIdcard1Url;
    }

    public Long getEnterpriseIdcard2(){
        return enterpriseIdcard2;
    }

    public void setEnterpriseIdcard2(Long enterpriseIdcard2){
        this.enterpriseIdcard2 = enterpriseIdcard2;
    }

    public String getEnterpriseIdcard2Url(){
        return enterpriseIdcard2Url;
    }

    public void setEnterpriseIdcard2Url(String enterpriseIdcard2Url){
        this.enterpriseIdcard2Url = enterpriseIdcard2Url;
    }

    public Long getEnterpriseAttorney(){
        return enterpriseAttorney;
    }

    public void setEnterpriseAttorney(Long enterpriseAttorney){
        this.enterpriseAttorney = enterpriseAttorney;
    }

    public String getEnterpriseAttorneyUrl(){
        return enterpriseAttorneyUrl;
    }

    public void setEnterpriseAttorneyUrl(String enterpriseAttorneyUrl){
        this.enterpriseAttorneyUrl = enterpriseAttorneyUrl;
    }

    public Integer getStatus(){
        return status;
    }

    public void setStatus(Integer status){
        this.status = status;
    }

    public Long getCreateId(){
        return createId;
    }

    public void setCreateId(Long createId){
        this.createId = createId;
    }

    public Long getUpdateId(){
        return updateId;
    }

    public void setUpdateId(Long updateId){
        this.updateId = updateId;
    }

    public LocalDateTime getCreateTime(){
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime){
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime(){
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime){
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o){
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){
            return false;
        }
        LindiEnterpriseRegistrationVO that = (LindiEnterpriseRegistrationVO) o;
        return Objects.equals(enterpriseRegistrationId, that.enterpriseRegistrationId) && Objects.equals(enterpriseName, that.enterpriseName) && Objects.equals(enterprisePerson, that.enterprisePerson) && Objects.equals(enterpriseMobile, that.enterpriseMobile) && Objects.equals(enterpriseBusinessLicense, that.enterpriseBusinessLicense) && Objects.equals(enterpriseBusinessLicenseUrl, that.enterpriseBusinessLicenseUrl) && Objects.equals(enterpriseTax, that.enterpriseTax) && Objects.equals(enterpriseTaxUrl, that.enterpriseTaxUrl) && Objects.equals(enterpriseCode, that.enterpriseCode) && Objects.equals(enterpriseCodeUrl, that.enterpriseCodeUrl) && Objects.equals(enterpriseIdcard1, that.enterpriseIdcard1) && Objects.equals(enterpriseIdcard1Url, that.enterpriseIdcard1Url) && Objects.equals(enterpriseIdcard2, that.enterpriseIdcard2) && Objects.equals(enterpriseIdcard2Url, that.enterpriseIdcard2Url) && Objects.equals(enterpriseAttorney, that.enterpriseAttorney) && Objects.equals(enterpriseAttorneyUrl, that.enterpriseAttorneyUrl) && Objects.equals(status, that.status) && Objects.equals(createId, that.createId) && Objects.equals(updateId, that.updateId) && Objects.equals(createTime, that.createTime) && Objects.equals(updateTime, that.updateTime);
    }

    @Override
    public int hashCode(){
        return Objects.hash(enterpriseRegistrationId, enterpriseName, enterprisePerson, enterpriseMobile, enterpriseBusinessLicense, enterpriseBusinessLicenseUrl, enterpriseTax, enterpriseTaxUrl, enterpriseCode, enterpriseCodeUrl, enterpriseIdcard1, enterpriseIdcard1Url, enterpriseIdcard2, enterpriseIdcard2Url, enterpriseAttorney, enterpriseAttorneyUrl, status, createId, updateId, createTime, updateTime);
    }
}
